import java.awt.Graphics;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JPanel;

/**
 * This class, which is a JPanel, serves simply as a splash screen to fill the HUD space in the first state of the game, TitleScreen.
 * It is just an image panel, displaying titlesplash.jpg and Story puts this in the HUD space in the beginning, and switches
 * to the real HUD after the title screen. 
 *
 */

public class TitleSplash extends JPanel
{    
	
	/**
	 * Paint the titlesplash.jpg picture on this panel.
	 */
    public void paintComponent(Graphics g)
    {
		super.paintComponent(g);
		
		try
        {
            g.drawImage(ImageIO.read(new File("titlesplash.jpg")), 0, 0, null);
        }
        catch (IOException e)       {e.printStackTrace();}
    }
}